const CryptoJS = require('crypto-js');
const { APP_SECERT } = require('../config/config');

function encrypt(content) {
  // console.log('content:', content,typeof content);
  const salt = CryptoJS.MD5(content + APP_SECERT);
  const result = CryptoJS.SHA1(salt, APP_SECERT).toString();
  // console.log(result.length)
  return result;
}

module.exports = encrypt;
